package com.example.demo.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author :蕉绿
 * @Date : 2023/3/10 19:15
 * @Version : V1.0
 * @Description :
 */
@Service
public class LogService {

    @Transactional(propagation = Propagation.REQUIRED)
    public int add() {
        int a = 10/0;
        return a;
    }
}
